package HomespDB;

	public class HomespDBUtil {
	public static final String DRIVER = "oracle.jdbc.driver.OracleDriver";
	public static final String URL = "jdbc:oracle:thin:@localhost:1521:xe";
	public static final String USERID = "hr";
	public static final String PASSWORD = "hr";
	
	public static final String CNinsert
	="insert into members values(?,?,sysdate,?,?,?,?,?,?)";
	public static final String CNGETUSER
	="select userid, password, enroldate, uname, email, zipcode, address, phone, status from members where userid=?";
	public static final String CLinsert
	="insert into BBS values(seq_board.nextval,?,?,?,?,sysdate,?)";
	public static final String CLGETALLBOARD
	="select num, name, title, content, count, crdate, password from bbs order by num ASC";
	public static final String CLGETBOARD 
	="select num, name, title, content, count, crdate, password from BBS where num=?";
	public static final String CAGETALLUSERS = "select cid, cname, enroldate, status from category";
	public static final String ASGETUSER
	= "select orderno, userid, orderDate, payprice, payMethod, cardNo, place, receiver, rphone, content, astatus, adate, bstatus, bdate, cstatus, cdate, dstatus, ddate, estatus, edate, fstatus, fdate, status from orderinfo where status=?";
	public static final String ACGETALLUSERS
	= "select cid, cname, enroldate, status  from category";
	public static final String ACDELETE
	= "delete from category where cid=?";
	public static final String ACINSERT
	= "insert into category values(?,?,sysdate,1)";
	public static final String AGGETALLUSERS
	= "select c.cname, g.gid, g.gname, g.sizes, g.price, g.stock, g.status from category c, goods g where c.cid = g.cid";
	public static final String AMGETALLUSERS
	= "select userid, uname, email, phone, status from members";
	public static final String GGETALLUSERS
	= "select gid, cid, gname, sizes, price, stock, content, img, status from goods where status = 1";
	public static final String GGETUSER
	= "select gid, cid, gname, sizes, price, stock, content, img, status from goods where cid like ? and status = 1";
	public static final String ADGUPDATE
	= "update goods set status = ? where gid = ?";
	public static final String ADGINSERT
	= "insert into goods values(?,?,?,?,?,?,?,?,?)";
	public static final String ADMUPDATE
	= "update members set status = ? where userid = ?";
	public static final String ADSAUPDATE
	= "update orderinfo set astatus = ?, adate=sysdate where orderno = ?";
	public static final String ADSBUPDATE
	= "update orderinfo set bstatus = ?, bdate=sysdate where orderno = ?";
	public static final String ADSCUPDATE
	= "update orderinfo set cstatus = ?, cdate=sysdate where orderno = ?";
	public static final String ADSDUPDATE
	= "update orderinfo set dstatus = ?, ddate=sysdate where orderno = ?";
	public static final String ADSEUPDATE
	= "update orderinfo set estatus = ?, edate=sysdate where orderno = ?";
	public static final String GOODLIST
	= "select gid, cid, gname, sizes, price, stock, content, img, status from goods where gid = ?";
	public static final String ASGETUSERS
	= "select orderno, userid, orderDate, payprice, payMethod, cardNo, place, receiver, rphone, content, astatus, adate, bstatus, bdate, cstatus, cdate, dstatus, ddate, estatus, edate, fstatus, fdate, status from orderinfo where status=? and userid=?";
	public static final String OUPDATE
	= "update orderinfo set fstatus=1, fdate=sysdate, status=0 where orderno=?";
	public static final String SERCHID
	= "select userid, password, enroldate, uname, email,zipcode,address,phone,status from members where uname=? and email=?";
	public static final String SERCHPW
	= "select userid, password, enroldate, uname, email,zipcode,address,phone,status from members where uname=? and userid=? and email=?";
	public static final String INSERT
	= "insert into orders values(home_seq.nextval, ?, ?, ?, sysdate, ?)";
	public static final String BUYINSERT
	= "insert into orderinfo values(home_seq.nextval,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
	public static final String GETALLUSERS
	= "select id, userid, gid, content, regdate from coment where gid=?";
	public static final String CONTENTINSERT
	= "insert into coment values(coment_seq.nextval,?,?,?,sysdate)";
	public static final String CUUPDATE
	= "update members set password=?, email=?, zipcode=?, address=?, phone=? where userid=?";
	public static final String UPDATE 
	= "update bbs set title=?,content=? where num=?";
	public static final String PCOUNT 
	= "update bbs set count=? where num=?";
	public static final String BBSINSERT
	= "delete from bbs where num=?";
	public static final String MEMBERDELETE
	= "delete from members where userid=?";
	
	
}

